Recent advances in computer performance have enabled graphic systems to provide more realistic graphical images using personal computers, home video game consoles, handheld devices, and the like. In such graphic systems, a number of procedures are executed to “render” or draw graphic primitives to the screen of the system. A “graphic primitive” is a basic component of a graphic picture, such as a point, line, polygon, or the like. Rendered images are formed with combinations of these graphic primitives. Many procedures may be utilized to perform 3-D graphics rendering.
Specialized graphics processing units (e.g., GPUs, etc.) have been developed to optimize the computations required in executing the graphics rendering procedures. The GPUs are configured for high-speed operation and typically incorporate one or more rendering pipelines. Each pipeline includes a number of hardware-based functional units that are optimized for high-speed execution of graphics instructions/data, where the instructions/data are fed into the front end of the pipeline and the computed results emerge at the back end of the pipeline. The hardware-based functional units, cache memories, firmware, and the like, of the GPU are optimized to operate on the low-level graphics primitives (e.g., comprising “points”, “lines”, “triangles”, etc.) and produce real-time rendered 3-D images.
The rendered images are generated using raster display technology. Raster display technology is widely used in computer graphics systems, and generally refers to the mechanism by which the grid of multiple pixels comprising an image are influenced by the graphics primitives. For each primitive, a typical rasterization system determines whether or not to “render,” or write a given pixel into a frame buffer or pixel map, as per the contribution of the primitive. This, in turn, determines how to write the data to the display buffer representing each pixel.
Once the primitives are rasterized into their constituent pixels, these pixels are then processed in pipeline stages subsequent to the rasterization stage where the rendering operations are performed. Generally, these rendering operations assign a color to each of the pixels of a display in accordance with the degree of coverage of the primitives comprising a scene. The per pixel color is also determined in accordance with texture map information that is assigned to the primitives, lighting information, and the like.
FIG. 1 shows an exemplary implementation of graphics processing unit (GPU) 100. The process performed by the GPU generally includes setting up a polygon model (e.g., a plurality of primitives) of objects, applying linear transformation to each primitive, culling back facing primitives, clipping the primitives against a view volume, rasterizing the primitives to a pixel coordinate set, shading/lighting the individual pixels using interpolated or incremental shading techniques, and the like. Accordingly, the GPU 100 hardware includes a setup engine 110, a raster pipeline 120, a shading pipeline 130, a data wire unit 140, and one or more other units.
It is sometimes desirable to interrupt the graphics processing in the GPU to serve a different process. Referring now to FIG. 2, a method of handling interrupts in the raster pipeline according to the conventional art is shown. At 210 a current primitive of a first process is rasterized. Before or after one or more primitives are rasterized, a check is performed to determine if an interrupt has been received, at 220. If an interrupt has not been received, the method continues with rasterizing the next primitive of the first process, at 210.
If an interrupt has been received at 230, rasterization of the first process is stopped and the rasterizer serves a second process at 240. When servicing of the second process is completed, the method continues with rasterizing the next primitive of the first process at 210. If rasterization of the current primitive, particularly in the coarse rasterizer, is run until it is completed it could take an unacceptably long time before the second process is served.